/**
 * Note: 路由配置项
 *
 * path: '/path'                    // 路由路径
 * name:'router-name'               // 设定路由的名字，一定要填写不然使用<keep-alive>时会出现各种问题
 * meta : {
	title: 'title'                  // 设置该路由在侧边栏的名字
	icon: 'icon-name'                // 设置该路由的图标
	activeMenu: '/system/user'      // 当路由设置了该属性，则会高亮相对应的侧边栏。
	query: '{"id": 1}'             // 访问路由的默认传递参数
	hidden: true                   // 当设置 true 的时候该路由不会在侧边栏出现 
    hideTab: true                   //当设置 true 的时候该路由不会在多标签tab栏出现
  }
 */

import type { RouteRecordRaw } from 'vue-router'

import { PageEnum } from '@/enums/pageEnum'
import Layout from '@/layout/default/index.vue'

export const LAYOUT = () => Promise.resolve(Layout)

export const INDEX_ROUTE_NAME = Symbol()

export const constantRoutes: Array<RouteRecordRaw> = [
    {
        path: '/',
        name: 'home',
        component: () => import('@/views/Home.vue')
    },
    {
        path: '/createMemorial',
        name: 'createMemorial',
        component: () => import('@/views/createMemorial/index.vue')
    },
    {
        path: '/:pathMatch(.*)*',
        component: () => import('@/views/error/404.vue')
    },
    {
        path: PageEnum.ERROR_403,
        component: () => import('@/views/error/403.vue')
    },
    {
        path: PageEnum.LOGIN,
        component: () => import('@/views/login/index.vue')
    },
    {
        path: '/memorialList',
        name: 'memorialList',
        component: () => import('@/views/memorialList/index.vue'),
    },
    {
        path: '/article',
        name: 'article',
        component: () => import('@/views/article/index.vue'),
    },
    {
        path: '/memorialManage',
        name: 'memorialManage',
        component: () => import('@/views/memorialManage/index.vue'),
        children: [
            {
                path: '',
                redirect: '/memorialManage/userInfo'
            },
            {
                path: 'userInfo',
                name: 'MemorialManageUserInfo',
                component: () => import('@/views/memorialManage/userInfo/index.vue')
            },
            {
                path: 'userInfoEdit',
                name: 'MemorialManageUserInfoEdit',
                component: () => import('@/views/memorialManage/userInfoEdit/index.vue')
            },
            {
                path: 'payInfo',
                name: 'MemorialManagePayInfo',
                component: () => import('@/views/memorialManage/payInfo/index.vue')
            },
            {
                path: 'manageList',
                name: 'MemorialManageList',
                component: () => import('@/views/memorialManage/manageList/index.vue')
            },
            {
                path: 'articleList',
                name: 'MemorialManageArticleList',
                component: () => import('@/views/memorialManage/articleList/index.vue')
            },
            {
                path: 'articleEdit',
                name: 'MemorialManageArticleEdit',
                component: () => import('@/views/memorialManage/articleEdit/index.vue')
            },
            {
                path: 'leaveNoteList',
                name: 'MemorialManageLeaveNoteList',
                component: () => import('@/views/memorialManage/leaveNoteList/index.vue')
            },
            {
                path: 'leaveNoteEdit',
                name: 'MemorialManageLeaveNoteEdit',
                component: () => import('@/views/memorialManage/leaveNoteEdit/index.vue')
            },
            {
                path: 'doubleMemorial',
                name: 'MemorialManageDoubleMemorial',
                component: () => import('@/views/memorialManage/doubleMemorial/index.vue')
            },
            {
                path: 'purse',
                name: 'MemorialManagePurse',
                component: () => import('@/views/memorialManage/purse/index.vue')
            },
            {
                path: 'upLevel',
                name: 'MemorialManageUpLevel',
                component: () => import('@/views/memorialManage/upLevel/index.vue')
            },
            {
                path: 'exchange',
                name: 'MemorialManageExchange',
                component: () => import('@/views/memorialManage/exchange/index.vue')
            },
            {
                path: 'familyIndex',
                name: 'familyIndex',
                component: () => import('@/views/memorialManage/family/index.vue'),
            },
            {
                path: 'createFamily',
                name: 'createFamily',
                component: () => import('@/views/memorialManage/family/createFamily.vue'),
            },
            {
                path: 'editFamily',
                name: 'editFamily',
                component: () => import('@/views/memorialManage/family/editFamily.vue'),
            },
            {
                path: 'createCemetery',
                name: 'createCemetery',
                component: () => import('@/views/memorialManage/cemetery/createCemetery.vue'),
            },
            {
                path: 'editCemetery',
                name: 'editCemetery',
                component: () => import('@/views/memorialManage/cemetery/editCemetery.vue'),
            },
            {
                path: 'cemeteryIndex',
                name: 'cemeteryIndex',
                component: () => import('@/views/memorialManage/cemetery/index.vue'),
            },
            {
                path: 'memorialEdit',
                name: 'memorialEdit',
                component: () => import('@/views/memorialManage/edit.vue'),
            },
            {
                path: 'graveyardBackground',
                name: 'graveyardBackground',
                component: () => import('@/views/memorialManage/graveyardBackground.vue'),
            },
            {
                path: 'memorialBackground',
                name: 'memorialBackground',
                component: () => import('@/views/memorialManage/memorialTemplateBackground.vue'),
            },
            {
                path: 'albumList',
                name: 'albumList',
                component: () => import('@/views/memorialManage/albumList/index.vue'),
            },
            {
                path: 'videoList',
                name: 'videoList',
                component: () => import('@/views/memorialManage/video/index.vue'),
            },
        ]
    },
    {
        path: '/register',
        name: 'register',
        component: () => import('@/views/register/index.vue'),
    },
    {
        path: '/memorialDetail',
        name: 'memorialDetail',
        component: () => import('@/views/memorialManage/detail.vue'),
    },
    {
        path: '/libation',
        name: 'libation',
        component: () => import('@/views/memorialManage/libation.vue'),
    },
    {
        path: '/muDetail',
        name: 'muDetail',
        component: () => import('@/views/detail/index.vue'),

    },
    {
        path: '/ordinaryMuDetail',
        name: 'ordinaryMuDetail',
        component: () => import('@/views/detail/ordinaryIndex.vue'),

    },
    {
        path: '/familyHome',
        name: 'familyHome',
        component: () => import('@/views/memorialManage/family/familyHome.vue'),
    },
    {
        path: '/familyHomeTemplate',
        name: 'familyHomeTemplate',
        component: () => import('@/views/memorialManage/family/familyHomeTemplate.vue'),
    },
    

    
    {
        path: '/cemeteryHome',
        name: 'cemeteryHome',
        component: () => import('@/views/memorialManage/cemetery/cemeteryHome.vue'),
    },
    {
        path: '/cemeteryHomeTemplate',
        name: 'cemeteryHomeTemplate',
        component: () => import('@/views/memorialManage/cemetery/cemeteryHomeTemplate.vue'),
    },
    
    
    {
        path: '/RMS',
        name: 'RMS',
        component: () => import('@/views/RMS/index.vue'),
        children: [
            {
                path: '',
                redirect: '/RMS/gift'
            },
            {
                path: 'gift',
                name: 'RMSGift',
                component: () => import('@/components/RMS/GiftManagement/index.vue')
            },
            {
                path: 'memorial',
                name: 'RMSMemorial',
                component: () => import('@/components/RMS/MemorialAudit/index.vue')
            },
            {
                path: 'member',
                name: 'RMSMember',
                component: () => import('@/components/RMS/MemberAudit/index.vue')
            },
            {
                path: 'message',
                name: 'RMSMessage',
                component: () => import('@/components/RMS/MessageManagement/index.vue')
            },
            {
                path: 'article',
                name: 'RMSArticle',
                component: () => import('@/components/RMS/ArticleManagement/index.vue')
            },
            {
                path: 'article/edit',
                name: 'RMSArticleEdit',
                component: () => import('@/components/RMS/ArticleManagement/edit.vue')
            },
            {
                path: 'recharge',
                name: 'RMSRecharge',
                component: () => import('@/components/RMS/RechargeRecord/index.vue')
            },
            {
                path: 'consumption',
                name: 'RMSConsumption',
                component: () => import('@/components/RMS/ConsumptionRecord/index.vue')
            }
        ]
    },
    // 团体馆列表
    {
        path: '/cemeteryList',
        name: 'cemeteryList',
        component: () => import('@/views/cemeteryList/index.vue'),
    },
    // {
    //     path: '/user',
    //     component: LAYOUT,
    //     children: [
    //         {
    //             path: 'setting',
    //             component: () => import('@/views/user/setting.vue'),
    //             name: Symbol(),
    //             meta: {
    //                 title: '个人设置'
    //             }
    //         }
    //     ]
    // },
    // {
    //     path: '/decoration/pc_details',
    //     component: () => import('@/views/decoration/pc_details.vue')
    // },
    // {
    //     path: '/dev_tools',
    //     component: LAYOUT,
    //     children: [
    //         {
    //             path: 'code/edit',
    //             component: () => import('@/views/dev_tools/code/edit.vue'),
    //             meta: {
    //                 title: '编辑数据表',
    //                 activeMenu: '/dev_tools/code'
    //             }
    //         }
    //     ]
    // },
    // {
    //     path: '/setting',
    //     component: LAYOUT,
    //     children: [
    //         {
    //             path: 'dict/data',
    //             component: () => import('@/views/setting/dict/data/index.vue'),
    //             meta: {
    //                 title: '数据管理',
    //                 activeMenu: '/setting/dict'
    //             }
    //         }
    //     ]
    // }
]
export const INDEX_ROUTE: RouteRecordRaw = {
    path: PageEnum.INDEX,
    component: LAYOUT,
    name: INDEX_ROUTE_NAME
}
